package com.sise.parkinglot.controller.applet;

import com.sise.parkinglot.bean.CodeMsg;
import com.sise.parkinglot.bean.ParkBean;
import com.sise.parkinglot.entity.Park;
import com.sise.parkinglot.service.IParkService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author ZJ
 */
@RestController
@RequestMapping("/api/park")
public class AppletParkController {

    @Resource
    private IParkService parkService;

    @PostMapping("/getParkByToken")
    public CodeMsg<List<ParkBean>> getParkByToken(@RequestBody Map<String, String> map){
        return parkService.getParkByToken(map);
    }

}
